package com.jing.cloud.service.api.config;

import com.jing.cloud.service.api.interceptor.TicketInterceptor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;

/**
 * Created by 29017 on 2017/9/18.
 */
@Component
public class WebConfig extends WebMvcConfigurerAdapter {

    @Autowired
    TicketInterceptor ticketInterceptor;

    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(ticketInterceptor);
    }
}
